package com.qs.sckill.config.redis.key;

import com.qs.sckill.config.redis.base.BasePrefix;

/**
 * 定义用户信息存储在redis的前缀及过期时间
 */
public class GoodsKey extends BasePrefix {

    public static final int GOODS_KEY_EXPIRE = 60;

    public GoodsKey(String prefix) {
        super(prefix);
    }

    public GoodsKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }

    //token存储在redis中前缀
    public static GoodsKey goodsList = new GoodsKey(GOODS_KEY_EXPIRE, "goodsList:");

    //秒杀商品库存
    public static GoodsKey sckillGoodsStock = new GoodsKey(60 * 3, "goodsStock:");
    public static GoodsKey sckillOver = new GoodsKey(60 * 3, "stockOver:");
}
